package com.hsjk.szwj.module.train.api;

import com.hsjk.szwj.module.train.api.dto.ClassDTO;
import com.hsjk.szwj.module.train.convert.ClassConvert;
import com.hsjk.szwj.module.train.dal.dataobject.course.ClassDO;
import com.hsjk.szwj.module.train.dal.mysql.course.IClassMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/09/04 23:48
 **/
@Service
public class ClassApiImpl implements IClassApi {
    @Resource
    private IClassMapper classMapper;

    @Override
    public ClassDTO getClassById(Long id) {
        ClassDO classDO = classMapper.selectById(id);
        return ClassConvert.INSTANCE.convertCourseDTO(classDO);
    }

}
